Integrand size = 26, antiderivative size = 750 \[ \int \frac {\left (d+e x^n\right )^3}{\left (a+b x^n+c x^{2 n}\right )^2} \, dx=\frac {x \left (b^2 c d^3-2 a c d \left (c d^2-3 a e^2\right )-a b e \left (3 c d^2+a e^2\right )-\left (a b^2 e^3+2 a c e \left (3 c d^2-a e^2\right )-b c d \left (c d^2+3 a e^2\right )\right ) x^n\right )}{a c \left (b^2-4 a c\right ) n \left (a+b x^n+c x^{2 n}\right )}+\frac {e^2 \left (e+\frac {6 c d-3 b e}{\sqrt {b^2-4 a c}}\right ) x \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{c \left (b-\sqrt {b^2-4 a c}\right )}+\frac {\left (\left (a b^2 e^3+2 a c e \left (3 c d^2-a e^2\right )-b c d \left (c d^2+3 a e^2\right )\right ) (1-n)+\frac {b^2 c d \left (3 a e^2 (1-3 n)-c d^2 (1-n)\right )-a b^3 e^3 (1-3 n)+4 a c^2 d \left (c d^2-3 a e^2\right ) (1-2 n)+2 a b c e \left (a e^2 (2-5 n)+3 c d^2 n\right )}{\sqrt {b^2-4 a c}}\right ) x \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{a c \left (b^2-4 a c\right ) \left (b-\sqrt {b^2-4 a c}\right ) n}+\frac {e^2 \left (e-\frac {3 (2 c d-b e)}{\sqrt {b^2-4 a c}}\right ) x \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{c \left (b+\sqrt {b^2-4 a c}\right )}+\frac {\left (\left (a b^2 e^3+2 a c e \left (3 c d^2-a e^2\right )-b c d \left (c d^2+3 a e^2\right )\right ) (1-n)-\frac {b^2 c d \left (3 a e^2 (1-3 n)-c d^2 (1-n)\right )-a b^3 e^3 (1-3 n)+4 a c^2 d \left (c d^2-3 a e^2\right ) (1-2 n)+2 a b c e \left (a e^2 (2-5 n)+3 c d^2 n\right )}{\sqrt {b^2-4 a c}}\right ) x \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{a c \left (b^2-4 a c\right ) \left (b+\sqrt {b^2-4 a c}\right ) n} \]
[Out]
Time = 1.77 (sec) , antiderivative size = 750, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {1450, 1444, 1436, 251} \[ \int \frac {\left (d+e x^n\right )^3}{\left (a+b x^n+c x^{2 n}\right )^2} \, dx=\frac {x \left (-\left (x^n \left (a b^2 e^3-b c d \left (3 a e^2+c d^2\right )+2 a c e \left (3 c d^2-a e^2\right )\right )\right )-a b e \left (a e^2+3 c d^2\right )-2 a c d \left (c d^2-3 a e^2\right )+b^2 c d^3\right )}{a c n \left (b^2-4 a c\right ) \left (a+b x^n+c x^{2 n}\right )}+\frac {e^2 x \left (\frac {6 c d-3 b e}{\sqrt {b^2-4 a c}}+e\right ) \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{c \left (b-\sqrt {b^2-4 a c}\right )}+\frac {e^2 x \left (e-\frac {3 (2 c d-b e)}{\sqrt {b^2-4 a c}}\right ) \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{c \left (\sqrt {b^2-4 a c}+b\right )}+\frac {x \left ((1-n) \left (a b^2 e^3-b c d \left (3 a e^2+c d^2\right )+2 a c e \left (3 c d^2-a e^2\right )\right )+\frac {-a b^3 e^3 (1-3 n)+b^2 c d \left (3 a e^2 (1-3 n)-c d^2 (1-n)\right )+2 a b c e \left (a e^2 (2-5 n)+3 c d^2 n\right )+4 a c^2 d (1-2 n) \left (c d^2-3 a e^2\right )}{\sqrt {b^2-4 a c}}\right ) \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{a c n \left (b^2-4 a c\right ) \left (b-\sqrt {b^2-4 a c}\right )}+\frac {x \left ((1-n) \left (a b^2 e^3-b c d \left (3 a e^2+c d^2\right )+2 a c e \left (3 c d^2-a e^2\right )\right )-\frac {-a b^3 e^3 (1-3 n)+b^2 c d \left (3 a e^2 (1-3 n)-c d^2 (1-n)\right )+2 a b c e \left (a e^2 (2-5 n)+3 c d^2 n\right )+4 a c^2 d (1-2 n) \left (c d^2-3 a e^2\right )}{\sqrt {b^2-4 a c}}\right ) \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{a c n \left (b^2-4 a c\right ) \left (\sqrt {b^2-4 a c}+b\right )} \]
[In]
[Out]
Rule 251
Rule 1436
Rule 1444
Rule 1450
Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {c^2 d^3-3 a c d e^2+a b e^3+\left (3 c^2 d^2 e-3 b c d e^2+b^2 e^3-a c e^3\right ) x^n}{c^2 \left (a+b x^n+c x^{2 n}\right )^2}+\frac {e^2 \left (3 c d-b e+c e x^n\right )}{c^2 \left (a+b x^n+c x^{2 n}\right )}\right ) \, dx \\ & = \frac {\int \frac {c^2 d^3-3 a c d e^2+a b e^3+\left (3 c^2 d^2 e-3 b c d e^2+b^2 e^3-a c e^3\right ) x^n}{\left (a+b x^n+c x^{2 n}\right )^2} \, dx}{c^2}+\frac {e^2 \int \frac {3 c d-b e+c e x^n}{a+b x^n+c x^{2 n}} \, dx}{c^2} \\ & = \frac {x \left (b^2 c d^3-2 a c d \left (c d^2-3 a e^2\right )-a b e \left (3 c d^2+a e^2\right )-\left (a b^2 e^3+2 a c e \left (3 c d^2-a e^2\right )-b c d \left (c d^2+3 a e^2\right )\right ) x^n\right )}{a c \left (b^2-4 a c\right ) n \left (a+b x^n+c x^{2 n}\right )}+\frac {\left (e^2 \left (e+\frac {6 c d-3 b e}{\sqrt {b^2-4 a c}}\right )\right ) \int \frac {1}{\frac {b}{2}-\frac {1}{2} \sqrt {b^2-4 a c}+c x^n} \, dx}{2 c}+\frac {\left (e^2 \left (e-\frac {3 (2 c d-b e)}{\sqrt {b^2-4 a c}}\right )\right ) \int \frac {1}{\frac {b}{2}+\frac {1}{2} \sqrt {b^2-4 a c}+c x^n} \, dx}{2 c}-\frac {\int \frac {-a b c e \left (3 c d^2+a e^2 (1-4 n)\right )-2 a c^2 d \left (c d^2-3 a e^2\right ) (1-2 n)-a b^3 e^3 n+b^2 c d \left (c d^2 (1-n)+3 a e^2 n\right )-c \left (a b^2 e^3+2 a c e \left (3 c d^2-a e^2\right )-b c d \left (c d^2+3 a e^2\right )\right ) (1-n) x^n}{a+b x^n+c x^{2 n}} \, dx}{a c^2 \left (b^2-4 a c\right ) n} \\ & = \frac {x \left (b^2 c d^3-2 a c d \left (c d^2-3 a e^2\right )-a b e \left (3 c d^2+a e^2\right )-\left (a b^2 e^3+2 a c e \left (3 c d^2-a e^2\right )-b c d \left (c d^2+3 a e^2\right )\right ) x^n\right )}{a c \left (b^2-4 a c\right ) n \left (a+b x^n+c x^{2 n}\right )}+\frac {e^2 \left (e+\frac {6 c d-3 b e}{\sqrt {b^2-4 a c}}\right ) x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{c \left (b-\sqrt {b^2-4 a c}\right )}+\frac {e^2 \left (e-\frac {3 (2 c d-b e)}{\sqrt {b^2-4 a c}}\right ) x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{c \left (b+\sqrt {b^2-4 a c}\right )}+\frac {\left (\left (a b^2 e^3+2 a c e \left (3 c d^2-a e^2\right )-b c d \left (c d^2+3 a e^2\right )\right ) (1-n)-\frac {b^2 c d \left (3 a e^2 (1-3 n)-c d^2 (1-n)\right )-a b^3 e^3 (1-3 n)+4 a c^2 d \left (c d^2-3 a e^2\right ) (1-2 n)+2 a b c e \left (a e^2 (2-5 n)+3 c d^2 n\right )}{\sqrt {b^2-4 a c}}\right ) \int \frac {1}{\frac {b}{2}+\frac {1}{2} \sqrt {b^2-4 a c}+c x^n} \, dx}{2 a c \left (b^2-4 a c\right ) n}+\frac {\left (\left (a b^2 e^3+2 a c e \left (3 c d^2-a e^2\right )-b c d \left (c d^2+3 a e^2\right )\right ) (1-n)+\frac {b^2 c d \left (3 a e^2 (1-3 n)-c d^2 (1-n)\right )-a b^3 e^3 (1-3 n)+4 a c^2 d \left (c d^2-3 a e^2\right ) (1-2 n)+2 a b c e \left (a e^2 (2-5 n)+3 c d^2 n\right )}{\sqrt {b^2-4 a c}}\right ) \int \frac {1}{\frac {b}{2}-\frac {1}{2} \sqrt {b^2-4 a c}+c x^n} \, dx}{2 a c \left (b^2-4 a c\right ) n} \\ & = \frac {x \left (b^2 c d^3-2 a c d \left (c d^2-3 a e^2\right )-a b e \left (3 c d^2+a e^2\right )-\left (a b^2 e^3+2 a c e \left (3 c d^2-a e^2\right )-b c d \left (c d^2+3 a e^2\right )\right ) x^n\right )}{a c \left (b^2-4 a c\right ) n \left (a+b x^n+c x^{2 n}\right )}+\frac {e^2 \left (e+\frac {6 c d-3 b e}{\sqrt {b^2-4 a c}}\right ) x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{c \left (b-\sqrt {b^2-4 a c}\right )}+\frac {\left (\left (a b^2 e^3+2 a c e \left (3 c d^2-a e^2\right )-b c d \left (c d^2+3 a e^2\right )\right ) (1-n)+\frac {b^2 c d \left (3 a e^2 (1-3 n)-c d^2 (1-n)\right )-a b^3 e^3 (1-3 n)+4 a c^2 d \left (c d^2-3 a e^2\right ) (1-2 n)+2 a b c e \left (a e^2 (2-5 n)+3 c d^2 n\right )}{\sqrt {b^2-4 a c}}\right ) x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{a c \left (b^2-4 a c\right ) \left (b-\sqrt {b^2-4 a c}\right ) n}+\frac {e^2 \left (e-\frac {3 (2 c d-b e)}{\sqrt {b^2-4 a c}}\right ) x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{c \left (b+\sqrt {b^2-4 a c}\right )}+\frac {\left (\left (a b^2 e^3+2 a c e \left (3 c d^2-a e^2\right )-b c d \left (c d^2+3 a e^2\right )\right ) (1-n)-\frac {b^2 c d \left (3 a e^2 (1-3 n)-c d^2 (1-n)\right )-a b^3 e^3 (1-3 n)+4 a c^2 d \left (c d^2-3 a e^2\right ) (1-2 n)+2 a b c e \left (a e^2 (2-5 n)+3 c d^2 n\right )}{\sqrt {b^2-4 a c}}\right ) x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{a c \left (b^2-4 a c\right ) \left (b+\sqrt {b^2-4 a c}\right ) n} \\ \end{align*}
Leaf count is larger than twice the leaf count of optimal. \(5537\) vs. \(2(750)=1500\).
Time = 7.56 (sec) , antiderivative size = 5537, normalized size of antiderivative = 7.38 \[ \int \frac {\left (d+e x^n\right )^3}{\left (a+b x^n+c x^{2 n}\right )^2} \, dx=\text {Result too large to show} \]
[In]
[Out]
\[\int \frac {\left (d +e \,x^{n}\right )^{3}}{\left (a +b \,x^{n}+c \,x^{2 n}\right )^{2}}d x\]
[In]
[Out]
\[ \int \frac {\left (d+e x^n\right )^3}{\left (a+b x^n+c x^{2 n}\right )^2} \, dx=\int { \frac {{\left (e x^{n} + d\right )}^{3}}{{\left (c x^{2 \, n} + b x^{n} + a\right )}^{2}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {\left (d+e x^n\right )^3}{\left (a+b x^n+c x^{2 n}\right )^2} \, dx=\text {Timed out} \]
[In]
[Out]
\[ \int \frac {\left (d+e x^n\right )^3}{\left (a+b x^n+c x^{2 n}\right )^2} \, dx=\int { \frac {{\left (e x^{n} + d\right )}^{3}}{{\left (c x^{2 \, n} + b x^{n} + a\right )}^{2}} \,d x } \]
[In]
[Out]
\[ \int \frac {\left (d+e x^n\right )^3}{\left (a+b x^n+c x^{2 n}\right )^2} \, dx=\int { \frac {{\left (e x^{n} + d\right )}^{3}}{{\left (c x^{2 \, n} + b x^{n} + a\right )}^{2}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {\left (d+e x^n\right )^3}{\left (a+b x^n+c x^{2 n}\right )^2} \, dx=\int \frac {{\left (d+e\,x^n\right )}^3}{{\left (a+b\,x^n+c\,x^{2\,n}\right )}^2} \,d x \]
[In]
[Out]